{include file="public/header" /}
<body>
<div class="x-body layui-anim">
    <form class="layui-form" id="form" action="{:url('save')}">
        <input type="hidden" id="id" name="id" value="{$Request.param.id}">
        {include file="public/arguments" /}
        <div class="layui-form-item">
            <label class="layui-form-label">活动名称</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" lay-reqtext="请填写活动名称" placeholder="请填写活动名称" class="layui-input" value="{$info?$info.title:''}"/>
            </div>
        </div>

        <div class="layui-form-item" >
            <label class="layui-form-label">价格</label>
            <div class="layui-input-inline">
                <input type="text" name="price"  lay-reqtext="价格" placeholder="价格"
                       class="layui-input" value="{$info?$info.price:''}"
                       onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">
            </div>
            <div class="layui-form-mid layui-word-aux">元</div>
        </div>

        <div class="layui-form-item" >
            <label class="layui-form-label">页数</label>
            <div class="layui-input-inline">
                <input type="text" name="pages"  lay-reqtext="页数" placeholder="页数"
                       class="layui-input" value="{$info?$info.pages:''}"
                       onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')">
            </div>
            <div class="layui-form-mid layui-word-aux">页</div>
        </div>

       {include file="form/items/img" type='' /}


        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-inline">
                <input type="text" name="sort" autocomplete="off" placeholder="请输入排序，越小越靠前" class="layui-input"
                       value="{$info?$info.sort:''}">
            </div>
        </div>




        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">详情</label>
            <div class="layui-input-block">
                <div data-filed="content" id="editor—wrapper" class="wang-editor editor—wrapper"
                     data-value='<?php echo isset($info)?$info['content']:"";?>'>
                    <input type="hidden" class="editor—content" name="content" value=''/>
                    <div class="toolbar-container" id="toolbar-container-content"><!-- 工具栏 --></div>
                    <div class="editor-container" id="editor-container-content"><!-- 编辑器 --></div>
                </div>
            </div>
        </div>

        <div class="layui-form-item" style="text-align: center;">
            <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
        </div>

    </form>
</div>
</body>
{include file="public/footer" /}

</html>